using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Surface
{
    /// <summary>
    /// <para>Add Surface Information</para>
    /// <para>Attributes features with spatial information derived from a  surface.</para>
    /// <para>使用从表面派生的空间信息对要素进行属性化。</para>
    /// </summary>    
    [DisplayName("Add Surface Information")]
    public class AddSurfaceInformation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddSurfaceInformation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_feature_class">
        /// <para>Input Features</para>
        /// <para>The point, multipoint, polyline, or polygon features that define the locations for determining one or more surface properties.</para>
        /// <para>点要素、多点要素、折线要素或面要素，用于定义用于确定一个或多个表面属性的位置。</para>
        /// </param>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The LAS dataset, mosaic, raster, terrain, or TIN surface used for interpolating z-values.</para>
        /// <para>用于插值 z 值的 LAS 数据集、镶嵌、栅格、terrain 或 TIN 表面。</para>
        /// </param>
        /// <param name="_out_property">
        /// <para>Output Property</para>
        /// <para><xdoc>
        ///   <para>The surface elevation property that will be added to the attribute table of the input feature class. The following list summarizes the available property keywords and their supported geometry types:</para>
        ///   <bulletList>
        ///     <bullet_item>Z—Surface Z values interpolated for the XY location of each single-point feature.</bullet_item><para/>
        ///     <bullet_item>Minimum Z—Lowest surface Z values in the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Maximum Z—Highest surface elevation in the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Mean Z—Average surface elevation of the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Surface Area—3D surface area for the region defined by each polygon.</bullet_item><para/>
        ///     <bullet_item>Surface Length—3D distance of the line along the surface.</bullet_item><para/>
        ///     <bullet_item>Minimum Slope—Slope value closest to zero along the line or within the area defined by the polygon.</bullet_item><para/>
        ///     <bullet_item>Maximum Slope—Highest slope value along the line or within the area defined by the polygon.</bullet_item><para/>
        ///     <bullet_item>Average Slope—Average slope value along the line or within the area defined by the polygon.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将添加到输入要素类的属性表中的表面高程属性。以下列表汇总了可用的属性关键字及其支持的几何类型：</para>
        ///   <bulletList>
        ///     <bullet_item>Z - 为每个单点要素的 XY 位置插值的 Surface Z 值。</bullet_item><para/>
        ///     <bullet_item>最小 Z - 由面定义的区域、沿线的长度或多点记录中点的插值中的最低曲面 Z 值。</bullet_item><para/>
        ///     <bullet_item>最大 Z - 由面定义的区域内、沿线的长度或多点记录中点的插值中的最高表面高程。</bullet_item><para/>
        ///     <bullet_item>平均 Z - 由面定义的区域、沿线的长度或多点记录中点的插值之间的区域的平均表面高程。</bullet_item><para/>
        ///     <bullet_item>表面积 - 每个面定义的区域的 3D 表面积。</bullet_item><para/>
        ///     <bullet_item>曲面长度 （Surface Length） - 线沿曲面的 3D 距离。</bullet_item><para/>
        ///     <bullet_item>最小坡度 （Minimum Slope） - 沿线或面定义的区域内最接近零的坡度值。</bullet_item><para/>
        ///     <bullet_item>最大坡度 - 沿线或面定义的区域内的最高坡度值。</bullet_item><para/>
        ///     <bullet_item>平均坡度 （Average Slope） - 沿线或面定义的区域内的平均坡度值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddSurfaceInformation(object _in_feature_class, object _in_surface, List<object> _out_property)
        {
            this._in_feature_class = _in_feature_class;
            this._in_surface = _in_surface;
            this._out_property = _out_property;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Add Surface Information";

        public override string CallName => "sa.AddSurfaceInformation";

        public override List<string> AcceptEnvironments => ["autoCommit", "extent", "geographicTransformations", "workspace"];

        public override object[] ParameterInfo => [_in_feature_class, _in_surface, _out_property, _method.GetGPValue(), _sample_distance, _z_factor, _pyramid_level_resolution, _noise_filtering, _output_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point, multipoint, polyline, or polygon features that define the locations for determining one or more surface properties.</para>
        /// <para>点要素、多点要素、折线要素或面要素，用于定义用于确定一个或多个表面属性的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The LAS dataset, mosaic, raster, terrain, or TIN surface used for interpolating z-values.</para>
        /// <para>用于插值 z 值的 LAS 数据集、镶嵌、栅格、terrain 或 TIN 表面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Output Property</para>
        /// <para><xdoc>
        ///   <para>The surface elevation property that will be added to the attribute table of the input feature class. The following list summarizes the available property keywords and their supported geometry types:</para>
        ///   <bulletList>
        ///     <bullet_item>Z—Surface Z values interpolated for the XY location of each single-point feature.</bullet_item><para/>
        ///     <bullet_item>Minimum Z—Lowest surface Z values in the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Maximum Z—Highest surface elevation in the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Mean Z—Average surface elevation of the area defined by the polygon, along the length of a line, or among the interpolated values for points in a multipoint record.</bullet_item><para/>
        ///     <bullet_item>Surface Area—3D surface area for the region defined by each polygon.</bullet_item><para/>
        ///     <bullet_item>Surface Length—3D distance of the line along the surface.</bullet_item><para/>
        ///     <bullet_item>Minimum Slope—Slope value closest to zero along the line or within the area defined by the polygon.</bullet_item><para/>
        ///     <bullet_item>Maximum Slope—Highest slope value along the line or within the area defined by the polygon.</bullet_item><para/>
        ///     <bullet_item>Average Slope—Average slope value along the line or within the area defined by the polygon.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将添加到输入要素类的属性表中的表面高程属性。以下列表汇总了可用的属性关键字及其支持的几何类型：</para>
        ///   <bulletList>
        ///     <bullet_item>Z - 为每个单点要素的 XY 位置插值的 Surface Z 值。</bullet_item><para/>
        ///     <bullet_item>最小 Z - 由面定义的区域、沿线的长度或多点记录中点的插值中的最低曲面 Z 值。</bullet_item><para/>
        ///     <bullet_item>最大 Z - 由面定义的区域内、沿线的长度或多点记录中点的插值中的最高表面高程。</bullet_item><para/>
        ///     <bullet_item>平均 Z - 由面定义的区域、沿线的长度或多点记录中点的插值之间的区域的平均表面高程。</bullet_item><para/>
        ///     <bullet_item>表面积 - 每个面定义的区域的 3D 表面积。</bullet_item><para/>
        ///     <bullet_item>曲面长度 （Surface Length） - 线沿曲面的 3D 距离。</bullet_item><para/>
        ///     <bullet_item>最小坡度 （Minimum Slope） - 沿线或面定义的区域内最接近零的坡度值。</bullet_item><para/>
        ///     <bullet_item>最大坡度 - 沿线或面定义的区域内的最高坡度值。</bullet_item><para/>
        ///     <bullet_item>平均坡度 （Average Slope） - 沿线或面定义的区域内的平均坡度值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Property")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _out_property { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Interpolation method used in determining information about the surface. The available options depend on the data type of the input surface:</para>
        ///   <bulletList>
        ///     <bullet_item>Bilinear—An interpolation method exclusive to the raster surface which determines cell values from the four nearest cells. This is the only option available for a raster surface.</bullet_item><para/>
        ///     <bullet_item>Linear— Default interpolation method for TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</bullet_item><para/>
        ///     <bullet_item>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Minimum Z— Obtains elevation from the smallest Z value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Maximum Z— Obtains elevation from the largest Z value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Z Closest To Mean— Obtains elevation from the Z value that is closest to the average of all the natural neighbors of a query point.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于确定有关曲面的信息的插值方法。可用选项取决于输入图面的数据类型：</para>
        ///   <bulletList>
        ///     <bullet_item>双线性 - 栅格表面专用的插值方法，用于确定四个最近像元的像元值。这是栅格表面唯一可用的选项。</bullet_item><para/>
        ///     <bullet_item>线性— TIN、terrain 和 LAS 数据集的默认插值方法。从包含查询点的 XY 位置的三角形定义的平面获取高程。</bullet_item><para/>
        ///     <bullet_item>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最小 Z - 从查询点的自然邻居中找到的最小 Z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最大 Z - 从查询点的自然邻居中找到的最大 Z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</bullet_item><para/>
        ///     <bullet_item>Conflate Z Nearest To Mean- 从最接近查询点所有自然邻居的平均值的 Z 值获取高程。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._LINEAR;

        public enum _method_value
        {
            /// <summary>
            /// <para>Linear</para>
            /// <para>Linear— Default interpolation method for TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</para>
            /// <para>线性— TIN、terrain 和 LAS 数据集的默认插值方法。从包含查询点的 XY 位置的三角形定义的平面获取高程。</para>
            /// </summary>
            [Description("Linear")]
            [GPEnumValue("LINEAR")]
            _LINEAR,

            /// <summary>
            /// <para>Natural Neighbors</para>
            /// <para>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</para>
            /// <para>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</para>
            /// </summary>
            [Description("Natural Neighbors")]
            [GPEnumValue("NATURAL_NEIGHBORS")]
            _NATURAL_NEIGHBORS,

            /// <summary>
            /// <para>Conflate Minimum Z</para>
            /// <para>Conflate Minimum Z— Obtains elevation from the smallest Z value found among the natural neighbors of a query point.</para>
            /// <para>混淆最小 Z - 从查询点的自然邻居中找到的最小 Z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Minimum Z")]
            [GPEnumValue("CONFLATE_ZMIN")]
            _CONFLATE_ZMIN,

            /// <summary>
            /// <para>Conflate Maximum Z</para>
            /// <para>Conflate Maximum Z— Obtains elevation from the largest Z value found among the natural neighbors of a query point.</para>
            /// <para>混淆最大 Z - 从查询点的自然邻居中找到的最大 Z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Maximum Z")]
            [GPEnumValue("CONFLATE_ZMAX")]
            _CONFLATE_ZMAX,

            /// <summary>
            /// <para>Conflate Nearest Z</para>
            /// <para>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</para>
            /// <para>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</para>
            /// </summary>
            [Description("Conflate Nearest Z")]
            [GPEnumValue("CONFLATE_NEAREST")]
            _CONFLATE_NEAREST,

            /// <summary>
            /// <para>Conflate Z Closest To Mean</para>
            /// <para>Conflate Z Closest To Mean— Obtains elevation from the Z value that is closest to the average of all the natural neighbors of a query point.</para>
            /// <para>Conflate Z Nearest To Mean- 从最接近查询点所有自然邻居的平均值的 Z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Z Closest To Mean")]
            [GPEnumValue("CONFLATE_CLOSEST_TO_MEAN")]
            _CONFLATE_CLOSEST_TO_MEAN,

            /// <summary>
            /// <para>Bilinear</para>
            /// <para>Bilinear—An interpolation method exclusive to the raster surface which determines cell values from the four nearest cells. This is the only option available for a raster surface.</para>
            /// <para>双线性 - 栅格表面专用的插值方法，用于确定四个最近像元的像元值。这是栅格表面唯一可用的选项。</para>
            /// </summary>
            [Description("Bilinear")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

        }

        /// <summary>
        /// <para>Sampling Distance</para>
        /// <para>The spacing at which z-values will be interpolated. By default, the raster cell size is used when the input surface is a raster, and the natural densification of the triangulated surface is used when the input is a terrain or TIN dataset.</para>
        /// <para>插值 z 值的间距。默认情况下，当输入表面为栅格时，将使用栅格像元大小，当输入为地形或 TIN 数据集时，将使用三角化表面的自然致密化。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _sample_distance { get; set; } = null;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor by which z-values will be multiplied. This is typically used to convert z linear units to match x,y linear units. The default is 1, which leaves elevation values unchanged. This parameter is not available if the spatial reference of the input surface has a z datum with a specified linear unit.</para>
        /// <para>z 值将乘以的因子。这通常用于转换 z 线性单位以匹配 x，y 线性单位。默认值为 1，使高程值保持不变。如果输入曲面的空间参考具有具有指定线性单位的 z 基准面，则此参数不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        /// <summary>
        /// <para>Noise Filtering</para>
        /// <para>Excludes portions of the surface that are potentially characterized by anomalous measurements from contributing to slope calculations. Line features offer a length filter, whereas polygons provide an area filter. The value corresponding with either filtering option is evaluated in the linear units of the feature's coordinate system. Non-slope properties are not affected by this parameter.</para>
        /// <para>将可能具有异常测量特征的表面部分排除在坡度计算之外。线要素提供长度过滤器，而面提供面积过滤器。与任一过滤选项对应的值将以要素坐标系的线性单位进行计算。非斜率属性不受此参数的影响。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Noise Filtering")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _noise_filtering { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_feature_class { get; set; }


        public AddSurfaceInformation SetEnv(int? autoCommit = null, object extent = null, object geographicTransformations = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, extent: extent, geographicTransformations: geographicTransformations, workspace: workspace);
            return this;
        }

    }

}